package com.letian.im.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.letian.common.annotation.Excel;
import com.letian.common.core.domain.BaseEntity;

import java.util.Date;

/**
 * 聊天信息对象 im_message
 * 
 * @author bmz
 * @date 2024-01-28
 */
public class ImMessage extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 聊天信息id */
    private Long id;

    /** 接收人 */
    @Excel(name = "接收人")
    private Long toId;

    /** 发送人 */
    @Excel(name = "发送人")
    private Long fromId;

    /** 发送时间 */
    @Excel(name = "发送时间")
    private Date sendTime;

    /** 内容 */
    @Excel(name = "内容")
    private String content;

    /** 类型 */
    @Excel(name = "类型")
    private String messageType;

    /** 扩展 */
    @Excel(name = "扩展")
    private String extend;

    /** 类型 */
    @Excel(name = "是否查看")
    private String is_view;

    /** 聊天室KEY */
    @Excel(name = "聊天室KEY")
    private String chatKey;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setToId(Long toId) 
    {
        this.toId = toId;
    }

    public Long getToId() 
    {
        return toId;
    }
    public void setFromId(Long fromId) 
    {
        this.fromId = fromId;
    }

    public Long getFromId() 
    {
        return fromId;
    }
    public void setSendTime(Date sendTime)
    {
        this.sendTime = sendTime;
    }

    public Date getSendTime()
    {
        return sendTime;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setExtend(String extend) 
    {
        this.extend = extend;
    }

    public String getExtend() 
    {
        return extend;
    }
    public void setIsView(String is_view)
    {
        this.is_view = is_view;
    }

    public String getIsView()
    {
        return is_view;
    }
    public void setMessageType(String messageType) 
    {
        this.messageType = messageType;
    }

    public String getMessageType() 
    {
        return messageType;
    }
    public void setChatKey(String chatKey) 
    {
        this.chatKey = chatKey;
    }

    public String getChatKey() 
    {
        return chatKey;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("toId", getToId())
            .append("fromId", getFromId())
            .append("sendTime", getSendTime())
            .append("content", getContent())
            .append("isView", getIsView())
            .append("extend", getExtend())
            .append("messageType", getMessageType())
            .append("chatKey", getChatKey())
            .toString();
    }
}
